<!DOCTYPE html>
<html>
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <meta name="author" content="lijinbo" />
    <meta name="cdnload" content="nzh" />
    <title>181-阿拉伯数字大写-金额大写</title>
    <style></style>
  </head>

  <body>
    <p>阿拉伯数字大写转大写工具参见：</p>
    <p>
      <a href="https://www.npmjs.com/package/nzh">nzh</a>
    </p>
    <br />
    <div>
      <div>数字输入：</div>
      <input id="input" type="number" />
    </div>
    <div>
      <div>大写：</div>
      <textarea id="max" cols="30" rows="10"></textarea>
    </div>
    <div>
      <div>金额大写：</div>
      <textarea id="moneyMax" cols="30" rows="10"></textarea>
    </div>
    <script>
      const input = document.getElementById('input')
      input.onblur = function () {
        const value = this.value
        document.getElementById('max').value = Nzh.cn.encodeS(value)
        document.getElementById('moneyMax').value = Nzh.cn.encodeB(value)
      }
    </script>
  </body>
</html>
